import request from '@/utils/request'

export const customQuery = (url, params) => {
	// console.log('Query Url: ', url)
	// console.log('Query Params: ', params)
	return new Promise((resolve) => {
		setTimeout(() => {
			if (url === 'listOperate') {
				resolve({
					code: 200,
					rows: [
						{
							id: 1,
							title: '卷积运算块',
							type: 'aTypeNode',
						},
						{
							id: 2,
							title: '词嵌入运算块',
							type: 'aTypeNode',
						},
						{
							id: 3,
							title: '平均池化运算块',
							type: 'aTypeNode',
						},
						{
							id: 4,
							title: '卷积运算块',
							type: 'aTypeNode',
						},
						{
							id: 5,
							title: '词嵌入运算块',
							type: 'aTypeNode',
						},
						{
							id: 6,
							title: '平均池化运算块',
							type: 'aTypeNode',
						},
					],
				})
			} else if (url === 'lsitHistoryModels') {
				resolve({
					code: 200,
					rows: [
						{
							id: 1,
							title: '历史模型块1',
							type: 'bTypeNode',
						},
						{
							id: 2,
							title: '历史模型块2',
							type: 'bTypeNode',
						},
						{
							id: 3,
							title: '历史模型块3',
							type: 'bTypeNode',
						},
					],
				})
			} else if (url === 'hyperParams') {
				resolve({
					code: 200,
					rows: [
						{
							id: 1,
							title: '必选 参数1',
							type: 'cTypeNode',
						},
						{
							id: 2,
							title: '必选 参数2',
							type: 'cTypeNode',
						},
						{
							id: 3,
							title: '非必选 参数3',
							type: 'cTypeNode',
						},
					],
				})
			}
		}, 500)
	})
}
